package BehaviorDesignPattern.ChainOfResponsibilityPattern;


// 具体处理者：总监，可以审批额度在10000元以下的请求
public class Director extends Approver {
    @Override
    public void approveRequest(int amount) {
        if (amount <= 10000) {
            System.out.println("总监批准了" + amount + "元的费用报销请求。");
        } else if (nextApprover != null) {
            System.out.println("总监无法批准" + amount + "元的请求，交由上级处理...");
            nextApprover.approveRequest(amount);
        } else {
            System.out.println("请求" + amount + "元的报销费用过高，无法批准。");
        }
    }
}